Skip to content

[4.3] Add PHP 8.6 support - #161

Merged
jakejackson1 merged 2 commits into
4.3from
backport/php-8.6-4.3
Nov 26, 2026
Merged

jakejackson1 merged 2 commits into
4.3from
backport/php-8.6-4.3

Conversation

@gravitypdf-bot

@gravitypdf-bot gravitypdf-bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #160 to 4.3, a new branch cut from the 4.2.0 tag, so PHP 8.6 support can ship as a 4.3.0 release without the unreleased behaviour changes on main.

Add PHP 8.6 support (cherry-pick of #160)

  • composer.json: allow ~8.6.0. The description now says "PHP 7.0 to 8.6"; the 7.0 lower bound in that text was already on 4.2.0 and is left as it was.
  • Unit testing workflow: add 8.6 to the PHPUnit matrix.
  • CHANGELOG.md: add "Add support for PHP 8.6" under Unreleased.

The test change from #160 is not included. testFailWriteXMLReportsWarning was added on main after 4.2.0 and doesn't exist on this branch.

Fix CI on ubuntu-26.04 (partial cherry-pick of 7ffe1aa)

This is needed to get CI green on this branch at all. It isn't related to 8.6. ubuntu-latest is now ubuntu-26.04, whose libxml2 2.15 no longer reports HTML parse errors, so testFailedParseHTMLElement failed on every PHP version. From main's fix:

  • TestCase::requireLegacyHtmlParser() skips that test when libxml parses HTML as HTML5, probed at runtime.
  • The coverage job runs on ubuntu-24.04, and only on PHP 8.3. Before, the include used the wrong key and set report: true on every job.
  • actions/checkout and codecov/codecov-action are bumped to v7.
  • The libxml2 2.14+ htmlqp() behaviour note is added to the changelog.

The issue #65 test changes and the examples.yml bump are left out, because those files don't exist on 4.2.0.

Verified

  • CI: all green, PHPUnit 7.1–8.6 and coding standards.
  • Locally on PHP 8.6.0: 307 tests pass. The 2 skips are the create_function tests, which always skip on PHP 8+.

🤖 Generated with Claude Code

jakejackson1 and others added 2 commits November 26, 2026 11:52
Backport of #160 to the 4.3 branch: allow ~8.6.0 in composer.json and
add 8.6 to the PHPUnit matrix.

The test change in #160 is not needed here.
testFailWriteXMLReportsWarning, which asserted the exact warning text
PHP 8.6 changed, was added on main after 4.2.0.

(cherry picked from commit 281a375)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backport of the applicable parts of 7ffe1aa. GitHub's ubuntu-latest is
now ubuntu-26.04, whose libxml2 2.15 no longer reports HTML parse
errors, so testFailedParseHTMLElement failed on every PHP version.

- Skip that test when libxml parses HTML as HTML5, probed at runtime
- Run the coverage job on ubuntu-24.04, and only on PHP 8.3 (the old
  include applied report: true to every job)
- Bump actions/checkout to v7 and codecov/codecov-action to v7

(cherry picked from commit 7ffe1aa)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (4.3@6599a11). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             4.3     #161   +/-   ##
======================================
  Coverage       ?   89.07%           
  Complexity     ?     1339           
======================================
  Files          ?       26           
  Lines          ?     2992           
  Branches       ?        0           
======================================
  Hits           ?     2665           
  Misses         ?      327           
  Partials       ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jakejackson1
jakejackson1 merged commit 764f0b9 into 4.3 Nov 26, 2026
15 checks passed
@jakejackson1
jakejackson1 deleted the backport/php-8.6-4.3 branch November 26, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants